3.2.29 \(\int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx\) [129]

Optimal. Leaf size=111 \[ \frac {F_1\left (1+p;\frac {1+p}{2},\frac {1}{2} (1-2 m+p);2+p;\sin (e+f x),-\sin (e+f x)\right ) (1-\sin (e+f x))^{\frac {1+p}{2}} (1+\sin (e+f x))^{\frac {1}{2} (1-2 m+p)} (a+a \sin (e+f x))^m (g \tan (e+f x))^{1+p}}{f g (1+p)} \]

[Out]

AppellF1(1+p,1/2-m+1/2*p,1/2+1/2*p,2+p,-sin(f*x+e),sin(f*x+e))*(1-sin(f*x+e))^(1/2+1/2*p)*(1+sin(f*x+e))^(1/2-
m+1/2*p)*(a+a*sin(f*x+e))^m*(g*tan(f*x+e))^(1+p)/f/g/(1+p)

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 111, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2799, 140, 138} \begin {gather*} \frac {(1-\sin (e+f x))^{\frac {p+1}{2}} (a \sin (e+f x)+a)^m (g \tan (e+f x))^{p+1} (\sin (e+f x)+1)^{\frac {1}{2} (-2 m+p+1)} F_1\left (p+1;\frac {p+1}{2},\frac {1}{2} (-2 m+p+1);p+2;\sin (e+f x),-\sin (e+f x)\right )}{f g (p+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^m*(g*Tan[e + f*x])^p,x]

[Out]

(AppellF1[1 + p, (1 + p)/2, (1 - 2*m + p)/2, 2 + p, Sin[e + f*x], -Sin[e + f*x]]*(1 - Sin[e + f*x])^((1 + p)/2
)*(1 + Sin[e + f*x])^((1 - 2*m + p)/2)*(a + a*Sin[e + f*x])^m*(g*Tan[e + f*x])^(1 + p))/(f*g*(1 + p))

Rule 138

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[c^n*e^p*((b*x)^(m +
 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2, (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 140

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Dist[c^IntPart[n]*((c +
d*x)^FracPart[n]/(1 + d*(x/c))^FracPart[n]), Int[(b*x)^m*(1 + d*(x/c))^n*(e + f*x)^p, x], x] /; FreeQ[{b, c, d
, e, f, m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !GtQ[c, 0]

Rule 2799

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_), x_Symbol] :> Dist[(g*Tan
[e + f*x])^(p + 1)*(a - b*Sin[e + f*x])^((p + 1)/2)*((a + b*Sin[e + f*x])^((p + 1)/2)/(f*g*(b*Sin[e + f*x])^(p
 + 1))), Subst[Int[x^p*((a + x)^(m - (p + 1)/2)/(a - x)^((p + 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a,
b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] &&  !IntegerQ[m] &&  !IntegerQ[p]

Rubi steps

\begin {align*} \int (a+a \sin (e+f x))^m (g \tan (e+f x))^p \, dx &=\frac {\left ((a \sin (e+f x))^{-1-p} (a-a \sin (e+f x))^{\frac {1+p}{2}} (a+a \sin (e+f x))^{\frac {1+p}{2}} (g \tan (e+f x))^{1+p}\right ) \text {Subst}\left (\int (a-x)^{\frac {1}{2} (-1-p)} x^p (a+x)^{m+\frac {1}{2} (-1-p)} \, dx,x,a \sin (e+f x)\right )}{f g}\\ &=\frac {\left ((1-\sin (e+f x))^{\frac {1}{2}+\frac {p}{2}} (a \sin (e+f x))^{-1-p} (a-a \sin (e+f x))^{-\frac {1}{2}-\frac {p}{2}+\frac {1+p}{2}} (a+a \sin (e+f x))^{\frac {1+p}{2}} (g \tan (e+f x))^{1+p}\right ) \text {Subst}\left (\int x^p (a+x)^{m+\frac {1}{2} (-1-p)} \left (1-\frac {x}{a}\right )^{\frac {1}{2} (-1-p)} \, dx,x,a \sin (e+f x)\right )}{f g}\\ &=\frac {\left ((1-\sin (e+f x))^{\frac {1}{2}+\frac {p}{2}} (a \sin (e+f x))^{-1-p} (1+\sin (e+f x))^{\frac {1}{2}-m+\frac {p}{2}} (a-a \sin (e+f x))^{-\frac {1}{2}-\frac {p}{2}+\frac {1+p}{2}} (a+a \sin (e+f x))^{-\frac {1}{2}+m-\frac {p}{2}+\frac {1+p}{2}} (g \tan (e+f x))^{1+p}\right ) \text {Subst}\left (\int x^p \left (1-\frac {x}{a}\right )^{\frac {1}{2} (-1-p)} \left (1+\frac {x}{a}\right )^{m+\frac {1}{2} (-1-p)} \, dx,x,a \sin (e+f x)\right )}{f g}\\ &=\frac {F_1\left (1+p;\frac {1+p}{2},\frac {1}{2} (1-2 m+p);2+p;\sin (e+f x),-\sin (e+f x)\right ) (1-\sin (e+f x))^{\frac {1+p}{2}} (1+\sin (e+f x))^{\frac {1}{2} (1-2 m+p)} (a+a \sin (e+f x))^m (g \tan (e+f x))^{1+p}}{f g (1+p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(367\) vs. \(2(111)=222\).
time = 1.42, size = 367, normalized size = 3.31 \begin {gather*} -\frac {2 (-3+p) F_1\left (\frac {1-p}{2};-p,1+m;\frac {3-p}{2};\cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right ) \cos ^3\left (\frac {1}{4} (2 e-\pi +2 f x)\right ) (a (1+\sin (e+f x)))^m \sin \left (\frac {1}{4} (2 e-\pi +2 f x)\right ) (g \tan (e+f x))^p}{f (-1+p) \left ((-3+p) F_1\left (\frac {1-p}{2};-p,1+m;\frac {3-p}{2};\cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right ) \cos ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )+2 \left (p F_1\left (\frac {3-p}{2};1-p,1+m;\frac {5-p}{2};\cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )+(1+m) F_1\left (\frac {3-p}{2};-p,2+m;\frac {5-p}{2};\cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )\right ) \sin ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + a*Sin[e + f*x])^m*(g*Tan[e + f*x])^p,x]

[Out]

(-2*(-3 + p)*AppellF1[(1 - p)/2, -p, 1 + m, (3 - p)/2, Cot[(2*e + Pi + 2*f*x)/4]^2, -Tan[(2*e - Pi + 2*f*x)/4]
^2]*Cos[(2*e - Pi + 2*f*x)/4]^3*(a*(1 + Sin[e + f*x]))^m*Sin[(2*e - Pi + 2*f*x)/4]*(g*Tan[e + f*x])^p)/(f*(-1
+ p)*((-3 + p)*AppellF1[(1 - p)/2, -p, 1 + m, (3 - p)/2, Cot[(2*e + Pi + 2*f*x)/4]^2, -Tan[(2*e - Pi + 2*f*x)/
4]^2]*Cos[(2*e - Pi + 2*f*x)/4]^2 + 2*(p*AppellF1[(3 - p)/2, 1 - p, 1 + m, (5 - p)/2, Cot[(2*e + Pi + 2*f*x)/4
]^2, -Tan[(2*e - Pi + 2*f*x)/4]^2] + (1 + m)*AppellF1[(3 - p)/2, -p, 2 + m, (5 - p)/2, Cot[(2*e + Pi + 2*f*x)/
4]^2, -Tan[(2*e - Pi + 2*f*x)/4]^2])*Sin[(2*e - Pi + 2*f*x)/4]^2))

________________________________________________________________________________________

Maple [F]
time = 0.18, size = 0, normalized size = 0.00 \[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (g \tan \left (f x +e \right )\right )^{p}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^m*(g*tan(f*x+e))^p,x)

[Out]

int((a+a*sin(f*x+e))^m*(g*tan(f*x+e))^p,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^m*(g*tan(f*x+e))^p,x, algorithm="maxima")

[Out]

integrate((a*sin(f*x + e) + a)^m*(g*tan(f*x + e))^p, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^m*(g*tan(f*x+e))^p,x, algorithm="fricas")

[Out]

integral((a*sin(f*x + e) + a)^m*(g*tan(f*x + e))^p, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \left (g \tan {\left (e + f x \right )}\right )^{p}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**m*(g*tan(f*x+e))**p,x)

[Out]

Integral((a*(sin(e + f*x) + 1))**m*(g*tan(e + f*x))**p, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^m*(g*tan(f*x+e))^p,x, algorithm="giac")

[Out]

integrate((a*sin(f*x + e) + a)^m*(g*tan(f*x + e))^p, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*tan(e + f*x))^p*(a + a*sin(e + f*x))^m,x)

[Out]

int((g*tan(e + f*x))^p*(a + a*sin(e + f*x))^m, x)

________________________________________________________________________________________